//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Feedback, FeedbackResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooFeedbackList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<FeedbackResponse>(`/uctoo/feedback/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooFeedback = async (id: string) => {
  return requestClient.get<Feedback>(`/uctoo/feedback/${id}`);
};

export const adductooFeedback = async (data: Partial<Feedback>) => {
  return requestClient.post<Feedback>('/uctoo/feedback/add', data);
};

export const edituctooFeedback = async (data: Partial<Feedback>) => {
  return requestClient.post<Feedback>('/uctoo/feedback/edit', data);
};

export const deleteuctooFeedback = async (id: string) => {
  return requestClient.post<any>('/uctoo/feedback/del', { id });
};
